/******************************************************************
 *
 * 	Programmer:		Brandon Shouse
 * 	Class:			CS362-400
 * 	Assignment:		Assignment 3
 *
 * 	Description: 		Card unit test for the village card
 *
 *****************************************************************/

#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "rngs.h"

int main() 
{
	struct gameState state;
	int numPlayer = 2;
	int p, r, i, test, test2, choice1, choice2, choice3, handPos, bonus,
	    currentPlayer;
	int seed = 1000;
	int k[10] = {adventurer, council_room, feast, gardens, mine, 
		remodel, smithy, village, baron, great_hall};

	memset(&state, 23, sizeof(struct gameState));
	r = initializeGame(numPlayer, k, seed, &state);

	printf("Testing the village card...\n");
	handPos = 2;
	currentPlayer = whoseTurn(&state);
	test = numHandCards(&state);
	cardEffect(k[7], choice1, choice2, choice3, &state, handPos, &bonus);
	test2 = numHandCards(&state);
	assert (test == test2);
	printf("\t+1 card: Passed\n");

	test = state.numActions + 2;
	cardEffect(k[7], choice1, choice2, choice3, &state, handPos, &bonus);
	test2 = state.numActions;
	assert (test == test2);
	printf("\t+2 actions: Passed\n");

	printf("Village card passed all tests...\n");

	return 0;

}
